package com.upcode.weighing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.upcode.weighing.domain.SysUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户角色表 Mapper 接口
 * </p>
 *
 * @author alex
 * @since 2019-04-10
 */
@Mapper
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
    int addUserRole(SysUserRole sysUserRole);//用户角色关联
    boolean add(@Param("list") List<SysUserRole> sysUserRoles);//批量给用户添加角色
    int delRoleUser(Long[] id);//删除 解除角色下绑定的用户
    SysUserRole queryByUserId(Long userId);//根据userId查询 用户角色关联表
}
